<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/WEB-INF/include/header.jsp" %>
<style>
    div { margin: 10px 0; }
</style>
<script>
function resize_parent_iframe() {
    if (window.parent) {
        var h = $("html").height();
        $('iframe[src*=test3_inner2]', window.parent.document).css("height", h);
    }
}
$(function() {
    resize_parent_iframe();

    var count = 0;
    $("button#count").click(function() {
        ++count;
        $("span#count").html(count);
        $("div#list").append("<div>" + new Date() + "</div>");
        resize_parent_iframe();
    });
});
</script>
</head>
<body>

<div class="container">

    <form>
        <h3>Javascript Count: <span id="count"></span></h3>
        <button type="button" class="btn" id="count">count</button>
        <button type="submit" class="btn" id="reset">reset</button>
    </form>

    <div id="list">
    </div>

</div>

</body>
</html>